#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
typedef long long LL;
LL POW(LL a, LL b) {
    LL ans=1;
    for (int i=0; i<b; ++i) {
        ans*=a;
    }
    return ans;
}
int main() {
    LL ask;
    while (cin>>ask) {
        LL k=1;
        while (ask>k*POW((LL)26,k)) {
            ask-=k*POW(26,k);
            ++k;
        }
        LL res=ask-(ask/k)*k;
        ask=ask/k;
        string s;
        while (k--) {
            s=s+(char)(ask%26+'A');
            ask=ask/26;
        }
        cout<<s[s.length()-1-res]<<endl;
    }
    return 0;
}
